package com.biz.primus.ms.base.feign;

import com.biz.primus.base.exception.BizException;
import com.biz.primus.base.exception.BizSilentException;
import com.netflix.hystrix.exception.HystrixBadRequestException;
import lombok.Getter;
import lombok.Setter;

/**
 * @author yanweijin
 * @date 2017/11/10
 */
@Getter
@Setter
public class MSBusinessException extends HystrixBadRequestException implements BizException{


	private int code;

	private String description;

	public MSBusinessException(String description) {
		super(description);
		this.description = description;
	}

	public MSBusinessException(BizSilentException cause) {
		super(cause.getMessage(), cause);
		this.code = cause.getCode();
		this.description = cause.getDescription();
	}

	public MSBusinessException(int code, String description) {
		super(description);
		this.code = code;
		this.description = description;
	}
}
